package com.zzyl.serve.service;

import java.util.List;

import com.huaweicloud.sdk.iotda.v5.model.ServiceCapability;
import com.zzyl.serve.domain.Device;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zzyl.serve.dto.DeviceDto;
import com.zzyl.serve.vo.DeviceDetailVo;
import com.zzyl.serve.vo.DeviceReportDataVo;
import com.zzyl.serve.vo.ProductVo;

/**
 * deviceService接口
 * 
 * @author MWJ
 * @date 2025-08-22
 */
public interface IDeviceService extends IService<Device>
{
    /**
     * 查询device
     * 
     * @param id device主键
     * @return device
     */
    public Device selectDeviceById(Long id);

    /**
     * 查询device列表
     * 
     * @param device device
     * @return device集合
     */
    public List<Device> selectDeviceList(Device device);

    /**
     * 新增device
     *
     * @param device device
     * @return 结果
     */
    public int insertDevice(Device device);

    /**
     * 修改device
     *
     * @param device device
     * @return 结果
     */
    public int updateDevice(Device device);

    /**
     * 批量删除device
     *
     * @param ids 需要删除的device主键集合
     * @return 结果
     */
    public int deleteDeviceByIds(Long[] ids);

    /**
     * 删除device信息
     *
     * @param id device主键
     * @return 结果
     */
    public int deleteDeviceById(Long id);

    void syncProductList();

    List<ProductVo> allProducts();

    void registerDevice(DeviceDto deviceDto);

    DeviceDetailVo detail(String iotId);

    List<DeviceReportDataVo> queryDeviceProperties(String iotId);

    void editDevice(DeviceDto deviceDto);

    void deleteDevice(String iotId);

    List<ServiceCapability> queryProductModelProperty(String productKey);
}
